import { Component, OnInit, Input } from '@angular/core';
import { AppGlobalService } from '../../shared/service/app-global.service';
import { Router } from '@angular/router';
@Component({
    selector: 'app-poster',
    templateUrl: './poster.component.html',
    styleUrls: ['./poster.component.scss'],
})
export class PosterComponent implements OnInit {

    @Input() tagData: any;

    constructor(
        private appGlobalService: AppGlobalService,
        private router: Router) {
    }
    ngOnInit() {
    }
    go(obj) {
        if (obj.target) {
            if (obj.params && obj.params.navigateByUrl) {
                this.router.navigateByUrl(obj.params.navigateByUrl);
            } else {
                this.appGlobalService.openPage(obj, '');
            }
        }
    }
}
